<template>
  <div>
    <div>
        <el-radio-group v-model="data.type">
            <el-radio v-if="showDevice" :label="'device'">设备控制</el-radio>
            <el-radio v-if="showAlarm" :label="'alarm'">告警消息</el-radio>
            <el-radio v-if="showScene" :label="'scene'">场景控制</el-radio>
        </el-radio-group>
    </div>
    <DeviceAction :config="data" v-if="data.type=='device'"></DeviceAction>
  </div>
</template>

<script>
  import DeviceAction from './DeviceAction.vue'
  export default {
    name: 'Action',
    props: {
     data:{
        type: Object,
        default: () => {
          return {
            type: '',
            services: []
          }
        }
     },
     showDevice:{
        type: Boolean,
        default: () => {
          return true
        }
     },
     showAlarm:{
        type: Boolean,
        default: () => {
          return true
        }
     },
     showScene:{
        type: Boolean,
        default: () => {
          return true
        }
     }
    },
    data() {
      return {
      }
    },
    components: {
      DeviceAction
    },
    created() {
    },
    methods: {
    }
  }
</script>

<style>
</style>
